package com.azt.novel.book.service.impl;


import com.azt.novel.book.dto.resp.BookCategoryRespDto;
import com.azt.novel.book.manager.cache.BookCategoryCacheManager;
import com.azt.novel.book.service.IBookCategoryService;
import com.azt.novel.common.resp.RestResp;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 小说类别 服务实现类
 * </p>
 *
 * @author azt
 * @since 2023-12-02
 */
@Service
public class BookCategoryServiceImpl implements IBookCategoryService {


    @Resource
    private BookCategoryCacheManager bookCategoryCacheManager;

    @Override
    public RestResp<List<BookCategoryRespDto>> listCategorys(Integer workDirection) {
        return RestResp.ok(bookCategoryCacheManager.listCategorys(workDirection));
    }
}
